#include <iostream>
#include <algorithm>
using namespace std;
const int maxn = 1e5+5;
int n,ans,a[maxn];
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    ios::sync_with_stdio(false);
    cin.tie(0); cout.tie(0);
    cin >> n;
    ans = n;
    for(int i = 1;i<=n;i++)cin >> a[i];
    if(n==1){
        cout << 1 << endl;
        return 0;
    }
    sort(a+1,a+n+1);
    int pt1 = 1,pt2 = upper_bound(a+1,a+n+1,a[pt1]) - a;
    while(pt2!=n+1){
        ans--;
        pt1++;
        pt2++;
        if(a[pt1]==a[pt2]){
            pt2=upper_bound(a+1,a+n+1,a[pt2]) - a;
        }
    }
    cout << ans << endl;
    return 0;
}

//Good luck CSP-S2 2024 
//RP++
//Wel and doowzs blesses me.
